package com.acme;

public class Bank {
	final int MAX_CLIENTS = 10;
	private Client[] clients = new Client[MAX_CLIENTS];
	
	private int clientCount = 0;
	
	public int getClientCount() {
		return clientCount;
	}

	public void addClient(Client client) {
		 
		if(client != null) {	
			if(this.clientCount < MAX_CLIENTS) {
				clients[this.clientCount] = client;
				this.clientCount++;
			} else {
				System.out.println("Too many clients");
			}
		} else {
			System.out.println("There is no client to add");
		}
	}
	
	public Client getClientById(int id) {
		if(this.clientCount > id && id >= 0) {
			return clients[id];
		} else {
			return null;
		}
	}

}
